<% if admin_authenticated? %>
<h1>Add new Project</h1>

<%= form_for @project do |f| %>

	<% if @project.errors.any? %>
	<h2>Errors:</h2>
	<ul>

<% @project.errors.full_messages.each do |message| %>

<li><%= message %></li>
<%end %>

	</ul>
	<%end%>
	</br>
	</br>
	<p>Photo: <br/>
		<%=f.file_field(:photo)%></p> 
		
		
	 <%= f.select :program, [['TMP','1'],['TLP','2'],['GCDP','3'],['GIP','4']] %>
  
    <%= f.select :exchange, [['Incoming','0'],['Outgoing','1'],['other','3']] %>	
	<p> <%= f .label :name %> <br/>

		<%= f.text_area :name %> 

	</p> 	

 	<h3> <%= f.label :summary %></h3>
		<%= f.text_area :summary %>	

<p> <%= f .label :description %> <br/>

		<%= f.text_area :description %> 

	</p> 

	<p>
		<%= f.submit "Add new Project" %>

	</p>

<% end %>

<script type="text/javascript">
$(document).ready(
function() {
$('#project_description').redactor();
$('#project_name').redactor();
$('#project_summary').redactor();
}
);
</script>
<%else%>

<h1>You' r not authorized nor qualified to create new project </h1>
					
				
					<% end %>